const app = getApp()
const $api = require('../../utils/api.js').API;
Page({
    data:{
        imgUrl:app.globalData.imgUrl,
        info:{},
    }, 
    onLoad: function(e){
        wx.showLoading()
        this.getCompanyInfo(e.id)
    },
    getCompanyInfo:function(id){
        var data = {'id':id}
        var that = this
        $api.get('company/info',data).then(res => {
            //请求成功
            wx.hideLoading()
            if(res.data.code == 1){
                that.setData({
                    info:res.data.data
                })
            }
        })
    },
    onShareAppMessage: function() {
        return {
            title: this.data.info.name+"-天意美业直通车",
            path: "/pages/index/index?puid="+wx.getStorageSync('uid')
        };
    }
});